<?php if (!defined('THINK_PATH')) exit();?><!-- <!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<link rel="stylesheet" href="/Public/layui-demo/layui-v2.5.6/css/layui.css">
	<style type="text/css">
		.container {
			width: 420px;
			height: 320px;
			min-height: 320px;
			max-height: 320px;
			position: absolute;
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			margin: auto;
			padding: 20px;
			z-index: 130;
			border-radius: 8px;
			background-color: #fff;
			box-shadow: 0 3px 18px rgba(100, 0, 0, .5);
			font-size: 16px;
		}

		.close {
			background-color: white;
			border: none;
			font-size: 18px;
			margin-left: 410px;
			margin-top: -10px;
		}

		.layui-input {
			border-radius: 5px;
			width: 300px;
			height: 40px;
			font-size: 15px;
		}

		.layui-form-item {
			margin-left: -20px;
		}

		#logoid {
			margin-top: -16px;
			padding-left: 150px;
			padding-bottom: 15px;
		}

		.layui-btn {
			margin-left: -50px;
			border-radius: 5px;
			width: 350px;
			height: 40px;
			font-size: 15px;
		}

		.verity {
			width: 120px;
		}

		.font-set {
			font-size: 13px;
			text-decoration: none;
			margin-left: 120px;
		}

		a:hover {
			text-decoration: underline;
		}
	</style>
</head>

<body>
	<form class="layui-form" action="<?php echo U('Login/dologin');?>" method="post">
		<div class="container">
			<button class="close" title="关闭"></button>
			<div class="layui-form-mid layui-word-aux">
				<img id="logoid" src="" height="35">
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">用户名</label>
				<div class="layui-input-block">
					<input type="text" name="username" required lay-verify="required" placeholder="请输入用户名"
						autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">密 &nbsp;&nbsp;码</label>
				<div class="layui-input-inline">
					<input type="password" name="password" required lay-verify="required" placeholder="请输入密码"
						autocomplete="off" class="layui-input">
				</div>

			</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit lay-filter="formDemo">登陆</button>
				</div>
			</div>

		</div>
	</form>
	<script type="text/javascript" src="/Public/layui-demo/layui-v2.5.6/layui.js"></script>
	<script>
		layui.use('form', function () {
			var form = layui.form
				, layer = layui.layer

		});
	</script>
</body>

</html> -->



<html>

<head>
	<meta charset="utf-8">
	<title>登录</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" href="/Public/layui/css/layui.css" media="all">
	<link rel="stylesheet" href="/Public/style/admin.css" media="all">
	<link rel="stylesheet" href="/Public/style/login.css" media="all">
	<link id="layuicss-layer" rel="stylesheet"
		href="https://www.layui.com/admin/std/dist/layuiadmin/layui/css/modules/layer/default/layer.css?v=3.1.1"
		media="all">
	<style id="LAY_layadmin_theme">
		.layui-side-menu,
		.layadmin-pagetabs .layui-tab-title li:after,
		.layadmin-pagetabs .layui-tab-title li.layui-this:after,
		.layui-layer-admin .layui-layer-title,
		.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>.layui-nav-child {
			background-color: #20222A !important;
		}

		.layui-nav-tree .layui-this,
		.layui-nav-tree .layui-this>a,
		.layui-nav-tree .layui-nav-child dd.layui-this,
		.layui-nav-tree .layui-nav-child dd.layui-this a {
			background-color: #009688 !important;
		}

		.layui-layout-admin .layui-logo {
			background-color: #20222A !important;
		}
	</style>
</head>

<body layadmin-themealias="default">


	<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
		<div class="layadmin-user-login-main">
			<div class="layadmin-user-login-box layadmin-user-login-header">
				<h2>Rbac权限管理系统</h2>
				<!-- <p></p> -->
			</div>

			<form method="post" class="layui-form">
				<div class="layadmin-user-login-box layadmin-user-login-body layui-form">
					<div class="layui-form-item">
						<label class="layadmin-user-login-icon layui-icon layui-icon-username"
							for="LAY-user-login-username"></label>
						<input type="text" name="username" placeholder="账号" class="layui-input">
					</div>
					<div class="layui-form-item">
						<label class="layadmin-user-login-icon layui-icon layui-icon-password"
							for="LAY-user-login-password"></label>
						<input type="password" name="password" placeholder="密码" class="layui-input">
					</div>
					<div class="layui-form-item">
						<div id="slider"></div>
					</div>
					<div class="layui-form-item">
						<button class="layui-btn layui-btn-fluid" lay-submit lay-filter="formDemo">登录
						</button>
					</div>
				</div>
			</form>

		</div>

		<div class="layui-trans layadmin-user-login-footer">

			<p>© 2020 <a href="" target="_blank">网商时代Rbac权限系统</a></p>
		</div>

	</div>

	<script src="/Public/layui/layui.js"></script>
	<script>
		layui.config({
			base: '/Public/lib/extend/',
		}).extend({
			sliderVerify: 'sliderVerify',
		});

		layui.use(['jquery', 'sliderVerify', 'form'], function () {
			var $ = layui.jquery;
			var sliderVerify = layui.sliderVerify;
			var form = layui.form;
			var layer = layui.layer;


			var slider = sliderVerify.render({
				elem: '#slider',
			})
			//监听提交
			form.on('submit(formDemo)', function (data) {
				$.post('<?php echo U('Login/dologin');?>', data.field, function (res) {
					if (res.code == 0) {
						layer.msg(res.msg, {
							icon: 1,
							shade: 0.3,
							end: function () { location.href = "<?php echo U('Index/index');?>" }
						})

					} else {
						layer.msg(res.msg, {
							icon: 5,
							shade: 0.3
						});
					}
				})
				return false;
			})

		});



	</script>
</body>

</html>